package com.neu.icloud.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.icloud.entity.Product;
import com.neu.icloud.mapper.ProductMapper;
import com.neu.icloud.service.ProductService;

@Service
public class ProductServiceImpl implements ProductService{

	@Autowired
	private ProductMapper productMapper;
	
	@Override
	public List<Product> listByProductName(String productName) {
		// TODO Auto-generated method stub
		return productMapper.listByProductName(productName);
	}

	@Override
	public int saveProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.saveProduct(product);
	}

	@Override
	public int updateProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.updateProduct(product);
	}

	@Override
	public int removeProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.removeProduct(product);
	}

	@Override
	public List<Product> listProduct(Integer productId) {
		// TODO Auto-generated method stub
		return productMapper.listProduct(productId);
	}

	@Override
	public List<Product> allListProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.allListProduct(product);
	}

	@Override
	public int countProduct(Product product) {
		// TODO Auto-generated method stub
		return productMapper.countProduct(product);
	}

	@Override
	public List<Product> findProductByFactoryId(Integer factoryId) {
		// TODO Auto-generated method stub
		return productMapper.findAllProductByFactoryId(factoryId);
	}

	@Override
	public List<Product> QueryProduct(String productName) {
		// TODO Auto-generated method stub
		return productMapper.QueryProduct(productName);
	}

	
}
